<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Building SimpleDBM</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
</head>
<body>
<h1>How to build SimpleDBM</h1>
<h2>Download required software</h2>
<h3>J2SE 5.0 SDK or above</h3>
<p>SimpleDBM requires J2SE 5.0 or above. <a
	href="http://java.sun.com/j2se">Download</a> and install JDK as per
instructions provided with the release.</p>
<h3>Maven 2</h3>
<p>Download and install <a href="http://maven.apache.org/">Maven
2</a>.</p>
<h3>Eclipse 3.2</h3>
<p><a href="http://www.eclipse.org">Download</a> a binary
distribution of Eclipse 3.2.</p>
<p>Make sure that Eclipse is setup to use J2SE 5.0 JRE, otherwise,
SimpleDBM code will not compile. You can find instructions on how to do
so <a
	href="http://www.eclipse.org/org/june05release/screencasts/4-generics/generics.html">here</a>.</p>
<h2>Configure Eclipse</h2>
<p>Create a new classpath variable named <tt>M2_REPO</tt> inside
Eclipse. From the menu bar, select Window > Preferences. Select the Java
> Build Path > Classpath Variables page.</p>
<p>This variable should contain the path to your local Maven 2
repository. Usually this is under &lt;Your Home
Directory&gt;/.m2/repository.</p>
<h3>Checkout SimpleDBM code</h3>
<ol>
	<li>Create a new SVN repository location in Eclipse<br />
	http://simpledbm.googlecode.com/svn/trunk/simpledbm-rss/code<br />
	If you are a committer, use https instead of http.</li>
	<li>Checkout the folder simpledbm-rss as a project in the
	workspace.</li>
	<li>Start a command shell. Cd to the project directory.</li>
	<li>Run <tt>mvn eclipse:clean</tt>, followed by <tt>mvn
	eclipse:eclipse</tt>.</li>
	<li>Switch back to Eclipse and refresh the project. It should now
	have a J against the project showing that it is a Java project. Eclipse
	is now setup to automatically rebuild SimpleDBM whenever you change any
	code.</li>
	<li>You can also build the SimpleDBM package using the Maven 2
	command line. From the project home directory, execute <tt>mvn
	package</tt>.</li>
</ol>
<h2>Test Code Coverage</h2>
<p>I use <a href="http://www.cenqua.com/clover/">Clover Code
Coverage</a> tool to analyse the coverage of unit test cases.</p>
<h3>Installing Clover plug-in in Eclipse</h3>
<p>The Clover plugin for Eclipse can be downloaded from the Clover <a
	href="http://www.cenqua.com/download.jspa">website</a>. After
downloading, extract the zip file and place contents in your Eclipse
plugins folder. You will need to separately download and install a
license file in the top-level Clover plugin directory. Restart Eclipse
to enable Clover.</p>
<p>Open the Project Properties window, and navigate to the Clover
tab. Click Enable Clover plugin in this project. Click on the
Compilation tab. Enable Fork compiler into separate JVM. Enter the Java
5.0 JDK installation directory in the JDK_HOME field, and set the Heap
size of the compiler JVM to 64 MB.</p>
<p>In the Clover View, select SimpleDBM project, and click on the
button Toggle Compiling with Clover. Now when you build SimpleDBM or run
any of the unit tests, Clover will automatically produce coverage data.</p>
<h3>Clover support in Maven builds</h3>
<p>The SimpleDBM Maven build script is already configured for
Clover. You must save the Clover license file to
src/test/clover/clover.license prior to executing mvn.</p>
<p>To build SimpleDBM with Clover enabled, and to produce a coverage
report, run:</p>
<pre>mvn clover:instrument clover:clover
</pre>
<p>The report will be produced in the folder target/site/clover.</p>
<hr />
<p>Copyright &#169; 2005-2006 by <a
	href="mailto:dibyendu@mazumdar.demon.co.uk">Dibyendu Majumdar</a>.</p>
</body>
</html>
